//
//  BySetPayPasswardSetp3VC.m
//  mijifen_ios
//
//  Created by 朱凯 on 2017/10/24.
//  Copyright © 2017年 itboye. All rights reserved.
//

#import "BySetPayPasswardSetp3VC.h"

@interface BySetPayPasswardSetp3VC ()

@end

@implementation BySetPayPasswardSetp3VC
{
    UILabel     *_noteLabel;        //
    UIImageView *_imageView;        // 密码输入
    
    UIButton    *_confirmButton;    // 确认
}
#pragma mark - view method
- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"设置交易密码";
    self.view.backgroundColor = BY_BG_COLOR;

    [self createViews];
}


#pragma mark - 创建视图
- (void)createViews {
    
    //
    _noteLabel = [[UILabel alloc] init];
    _noteLabel.text = @"设置成功";
    _noteLabel.font = FONT(24);
    _noteLabel.textAlignment = NSTextAlignmentCenter;
    _noteLabel.textColor = [UIColor blackColor];
    [self.view addSubview:_noteLabel];
    
  
    //
    _imageView = [UIImageView new];
    _imageView.image = [UIImage imageNamed:@"成功-蓝"];
    [self.view addSubview:_imageView];
    
    // 确认
    _confirmButton = [UIButton buttonWithType:UIButtonTypeCustom];
    _confirmButton.titleLabel.font = FONT(18);
    _confirmButton.backgroundColor = BY_THEME_COLOR;
    _confirmButton.layer.cornerRadius = 4;
    [_confirmButton setTitle:@"确认" forState:UIControlStateNormal];
    [_confirmButton setTitleColor:BY_GOLD_COLOR forState:UIControlStateNormal];
    [_confirmButton addTarget:self action:@selector(nextStep) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:_confirmButton];

    
    // 布局
    [_noteLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.equalTo(@100);
        make.left.right.top.equalTo(self.view);
    }];
    [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.height.equalTo(self.view.mas_width).multipliedBy(0.33);
        make.centerX.equalTo(self.view);
        make.top.equalTo(_noteLabel.mas_bottom);
    }];
   
    [_confirmButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.equalTo(@50);
        make.left.equalTo(@15);
        make.right.equalTo(@(-15));
        make.top.equalTo(_imageView.mas_bottom).offset(100);
    }];
}

#pragma mark - 点击事件
- (void)nextStep {
    
    [self by_normalPopVC:@"BySetPayPasswardSetp1VC"];
}
@end
